<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST , ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace admin\controller;
use \admin\home;
use \temmoku\lib\uploadfiles;
class upfile extends home{
	public function up(){
		!isset($_POST['mid']) && $_POST['mid']=0;
		!isset($_POST['filename']) && $filename='file';
		$ModelDB_Setting=[];
		if($_POST['mid'] && (!defined('P_MODULE') || !defined('M_MODULE'))){
			$ModelDB_Setting=unserialize(C('home|home_ModelDB.'.$_POST['mid'])['setting']);
			$ModelDB_Setting=$ModelDB_Setting[$_POST['keys']];
		}

		//判断是不是缩略图
		$_GET['thumb'] ? $thumb=true : $thumb=false;
		echo (new uploadfiles)->Upload_Star($ModelDB_Setting,$filename,$thumb,'json');
	}
}
?>